package com.example.domain;

import java.util.Date;
import java.util.Objects;

public class t_user {
    private int id;
    private String username,password,email;
    private Date created; //创建时间
    private String authority; //权限
    private boolean valid; // 是否激活

    private String title;//博客标题
    private String describes;//博客描述
    private String avatar;//头像信息

    @Override
    public String toString() {
        return "t_user{" +
                "id=" + id +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", email='" + email + '\'' +
                ", created=" + created +
                ", authority='" + authority + '\'' +
                ", valid=" + valid +
                ", title='" + title + '\'' +
                ", describes='" + describes + '\'' +
                ", avatar='" + avatar + '\'' +
                '}';
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {

        this.avatar = avatar;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        t_user t_user = (t_user) o;
        return id == t_user.id &&
                valid == t_user.valid &&
                Objects.equals(username, t_user.username) &&
                Objects.equals(password, t_user.password) &&
                Objects.equals(email, t_user.email) &&
                Objects.equals(created, t_user.created) &&
                Objects.equals(authority, t_user.authority) &&
                Objects.equals(title, t_user.title) &&
                Objects.equals(describes, t_user.describes) &&
                Objects.equals(avatar, t_user.avatar);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, username, password, email, created, authority, valid, title, describes, avatar);
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getDescribes() {
        return describes;
    }

    public void setDescribes(String describes) {
        this.describes = describes;
    }

    public boolean isValid() {
        return valid;
    }

    public void setValid(boolean valid) {
        this.valid = valid;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public Date getCreated() {
        return created;
    }

    public void setCreated(Date created) {
        this.created = created;
    }

    public String getAuthority() {
        return authority;
    }

    public void setAuthority(String authority) {
        this.authority = authority;
    }
}
